package com.example.demo.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.demo.service.dubbo.TestService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by huby on 2021/7/26.
 */
@RestController("")
public class TestController {

    @Reference(version = "1.0.0",timeout = 300)
    private TestService testService;

    @RequestMapping(value = "/test/{data}",method ={ RequestMethod.GET,RequestMethod.POST})
    public String Test(@PathVariable String data){
        return "test success"+data;

    }
}
